package com.sjg.sys.service;

import com.sjg.sys.utils.CommUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.sjg.sys.entity.SysScheduleJob;
import com.sjg.sys.dao.SysScheduleJobDao;

@Service
public class SysScheduleJobService{

    @Resource
    private SysScheduleJobDao sysScheduleJobDao;

    public int insert(SysScheduleJob pojo){pojo.setId(CommUtil.getPrimaryKey());
        return sysScheduleJobDao.insert(pojo);
    }

    public int insertSelective(SysScheduleJob pojo){
        pojo.setId(CommUtil.getPrimaryKey());
        return sysScheduleJobDao.insertSelective(pojo);
    }

    public int insertList(List<SysScheduleJob> pojos){
        for(SysScheduleJob sysScheduleJob:pojos){
            sysScheduleJob.setId(CommUtil.getPrimaryKey());
        }
        return sysScheduleJobDao.insertList(pojos);
    }

    public int update(SysScheduleJob pojo){
        return sysScheduleJobDao.update(pojo);
    }
}
